{
  "name": "@cloud-carbon-footprint/api-template",
  "version": "0.3.0",
  "license": "Apache-2.0",
  "description": "The API endpoint as an entrypoint to get cloud energy and carbon emissions. Optionally used by the client dashboard.",
  "main": "src/server.ts",
  "publishConfig": {
    "main": "dist/server.js"
  },
  "homepage": "https://www.cloudcarbonfootprint.org/",
  "repository": {
    "type": "git",
    "url": "https://github.com/cloud-carbon-footprint/cloud-carbon-footprint",
    "directory": "packages/api"
  },
  "keywords": [
    "thoughtworks",
    "cloud",
    "sustainability",
    "climate",
    "carbon-emissions",
    "carbon-footprint"
  ],
  "scripts": {
    "precommit": "lint-staged --no-stash && yarn test --coverage --runInBand --bail",
    "test": "jest",
    "type-check": "tsc --noEmit",
    "sonar:scan": "sonar-scanner",
    "test:watch": "jest --coverage --watchAll",
    "build": "rimraf dist && yarn build:tsc && yarn prepack && cp package.json dist && yarn postpack",
    "build:tsc": "tsc --build tsconfig.json",
    "build:watch": "onchange 'src/**/*.ts' -- yarn build",
    "build:workspace": "mkdir -p ../../dist-workspace/packages/api/dist && cp -R dist ../../dist-workspace/packages/api && mv ../../dist-workspace/packages/api/dist/package.json ../../dist-workspace/packages/api",
    "build:update": "node ../../scripts/update-package-dependencies.js api app common",
    "prepack": "ts-node ../../scripts/prepack.ts",
    "postpack": "ts-node ../../scripts/postpack.ts",
    "view:coverage": "serve coverage/lcov-report",
    "clean": "rm -rf coverage src/**/*.js src/**/*.map",
    "lint": "eslint '*/**/*.ts' --quiet",
    "lint:fix": "eslint '*/**/*.ts' --quiet --fix",
    "start": "yarn start:web",
    "start:prod": "yarn start:webprod",
    "start:web": "ts-node-dev src/server.ts",
    "start:webprod": "NODE_ENV=production node dist/server.js",
    "docker:start": "docker run --name ccf_base -dt --rm -v $(pwd):/cloud-carbon-footprint/packages/api -v $HOME/.aws/credentials:/home/circleci/.aws/credentials -e AWS_PROFILE circleci/node:current bash",
    "docker:setup": "docker exec -w /cloud-carbon-footprint/packages/api -it ccf_base yarn install --immutable",
    "docker:test": "docker exec -w /cloud-carbon-footprint/packages/api -it ccf_base yarn test",
    "docker:cli": "docker exec -w /cloud-carbon-footprint/packages/api -e AWS_PROFILE -it ccf_base yarn start:cli -- ",
    "docker:stop": "docker stop ccf_base"
  },
  "devDependencies": {
    "@types/cors": "^2.8.12",
    "@types/jest": "^27.4.0",
    "@types/jest-when": "^3.5.0",
    "@types/node": "^17.0.8",
    "@types/source-map-support": "^0.5.3",
    "@types/supertest": "^2.0.11",
    "@types/swagger-jsdoc": "^6.0.1",
    "@types/swagger-ui-express": "^4.1.3",
    "@typescript-eslint/eslint-plugin": "^5.9.0",
    "@typescript-eslint/parser": "^5.9.0",
    "eslint": "^8.6.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-unused-imports": "^2.0.0",
    "jest": "^27.4.7",
    "jest-when": "^3.5.0",
    "lint-staged": "^12.1.7",
    "onchange": "^7.1.0",
    "prettier": "^2.5.1",
    "rimraf": "^3.0.2",
    "source-map-support": "^0.5.19",
    "supertest": "^6.1.3",
    "ts-jest": "^27.1.2",
    "ts-node": "^10.4.0",
    "ts-node-dev": "^2.0.0",
    "typescript": "^4.6.2"
  },
  "dependencies": {
    "@cloud-carbon-footprint/app": "^{{version '@cloud-carbon-footprint/app'}}",
    "@cloud-carbon-footprint/common": "^{{version '@cloud-carbon-footprint/common'}}",
    "@types/express": "^4.17.12",
    "cors": "^2.8.5",
    "express": "^4.17.1",
    "helmet": "^5.0.1",
    "module-alias": "^2.2.2",
    "swagger-jsdoc": "^6.2.8",
    "swagger-ui-express": "^4.6.2"
  },
  "lint-staged": {
    "*.{js,ts}": [
      "yarn lint"
    ]
  }
}
